<script type="text/javascript">
	$(document).ready(function(){
		$("input,select,textarea").not("[type=submit]").jqBootstrapValidation( {
			submitSuccess: function ($form, event) { 
				event.preventDefault();
				
				 //frmProfile
				$.ajax({
					type: "POST",
					url: "addProfile.php",
					data: $('#frmProfile').serialize(),
					cach: false,
					error: function() {
						alert("ERROR !!!!");
					},
					success: function(data){
						//alert(data);
						//window.location.href="index.php";
						//$('#myTab a[href="#profile"]').tab('show');
						$("#disp").after(data);

					}
				});

			}
			
		});
	});
</script>


<form id="frmProfile" name="frmProfile" class="form-horizontal" method="post" action="" novalidate="">
	<div class="control-group">
		<label class="control-label">My name</label>
		<div class="controls ">
			<input type="text" id="name" name="name" class="input-xlarge"  value="kobbb" required />
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">Email address</label>
		<div class="controls ">
			<input type="email" id="email" name="email" value="test@test.com"  required />
		</div>
	</div>

	<div class="control-group">
		<label class="control-label">Telephone</label>
		<div class="controls ">
			<input type="number" id="tel" name="tel" value="081111111"  required />
		</div>
	</div>

	<div class="control-group">
		<label class="control-label">Birthdate</label>
		<div class="controls ">
			<input type="text" id="datepicker" name="datepicker"  value="31/12/2013" required />
		</div>
	</div>
	<button type="submit" id="submit" class="btn btn-primary">Test Validation <i class="icon-ok icon-white"></i></button>
	

</form>

<div id="disp"></div>